package com.wayne.common.exception;

/**
 * 异常码
 *
 * @author jackshen
 */
public enum ErrorCode {
  OK(200, "OK"),
  NOT_MODIFIED(304, "Not Modified"),
  BAD_REQUEST(400, "Bad Request"),
  UNAUTHORIZED(401, "Unauthorized"),
  FORBIDDEN(403, "Forbidden"),
  NOT_FOUND(404, "Not Found"),
  METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
  REQUEST_TIMEOUT(408, "Request Timeout"),
  SERVER_ERROR(500, "Server Error");

  private final int code;
  private final String msg;

  ErrorCode(int code, String msg) {
    this.code = code;
    this.msg = msg;
  }

  public int getCode() {
    return code;
  }

  public String getMsg() {
    return msg;
  }
}
